import { MainService } from './../../service/main.service';
import { Component, OnInit } from '@angular/core';
import * as $ from 'jquery';
import {  Router } from '../../../../node_modules/@angular/router';

@Component({
  selector: 'app-nav',
  templateUrl: './nav.component.html',
  styleUrls: ['./nav.component.css']
})
export class NavComponent implements OnInit {

  public navList;
  pageId:string

  constructor(private router:Router,private service:MainService) {
      service.getFromServ('/api/category/getTop',{},res=>{
        console.log(res);
        this.navList = res.data
      },err=>{})

   }

  ngOnInit() {
  }
  goToEn(){
    this.router.navigateByUrl('/en/')
  }
}
